import { createApp } from 'vue'
import { createPinia } from 'pinia'
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'
import App from './App.vue'
import router from './router'

// 引入懒加载指令插件并注册
const app = createApp(App)
import {lazyPlugin} from '@/directives/index' // 引入懒加载插件
app.use(lazyPlugin)

const pinia = createPinia()
// 注册持久化插件
pinia.use(piniaPluginPersistedstate)
app.use(pinia)
import { componentPlugin } from './components' // 引入全局组件插件
app.use(router)
app.use(componentPlugin)
app.mount('#app')

